﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using Avatar.Person;
using Avatar.Common;

public partial class PersonAppRecord : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            if (Membership.GetUser() != null)
            {
                var _jobs = JobApplicationRecordManager.GetRecordList(Membership.GetUser().UserName);
                ListView1.DataSource = _jobs;
                ListView1.DataBind();
            }
        }
    }
    protected void btn_ApplicantSum_Click(object sender, EventArgs e)
    {
        LinkButton _btn = sender as LinkButton;

        Guid _jobID = string.IsNullOrEmpty(_btn.CommandArgument) ? Guid.Empty : new Guid(_btn.CommandArgument);
        
        int _applicant=JobApplicationRecordManager.ApplicantNumber(_jobID);

        Helper.ShowMassage("此职位当前共有申请者: " + _applicant.ToString() + " 人", Request.Url.ToString());
    }
}
